<?php

# PMB Online
# Aplikasi PMB Online untuk Pendaftaran Calon Mahasiswa di PT/PTS Indonesia
# 
# version 1.0
# class tha
# file
# created Feb 4, 2013 7:41:31 PM
# 
# (c)2012, arif.laksito@gmail.com

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
?>
<h3>Pengaturan Tahun PMB</h3>
<ul class="breadcrumb">
    <li>PMB Online <span class="divider">/</span></li>  
    <li>Data Master <span class="divider">/</span></li>
    <li>Tahun PMB</li>
</ul>

<?php if(isset($msg)):?>
<div class="<?php echo ($sts)?'alert alert-success':'alert alert-error'?>">
    <?php echo $msg?>
</div>
<?php endif?>

<p>
<form action="" method="post" class="form-search">    
    <input type="text" name="tha" class="input-small" placeholder="Tahun PMB" />
    <input type="submit" value="Tambah Data" class="btn btn-primary" />
</form>
</p>

<table class="table table-condensed table-hover" style="width: 60%">
    <tr>
        <th>No</th>
        <th>Tahun PMB</th>        
        <th>Status</th>        
        <th></th>
    </tr>
    <?php $i=0?>
    <?php foreach($tha as $t):?>
    <tr>
        <td><?php echo $i+1?></td>
        <td><?php echo $t['tha']?></td>        
        <td>
            <?php if($t['status']==1):?><span class="text-success">Aktif</span>
            <?php else:?><span class="text-error">Tidak Aktif</span><?php endif;?>
        </td>        
        <td>
            <?php if($t['status']==0):?>
            <div class="pull-right">
            <?php echo anchor('apps/tha_set/'.$t['id_tha'],'Set Aktif', 'class="btn btn-small btn-success"')?>
            </div>    
            <?php endif?>
        </td>
    </tr>
    <?php $i++?>
    <?php endforeach;?>
</table>    